-- GENERATED SPELL FOR [Defias Renegade Mage] --


function spell0_450(pUnit, Event) --@Fire Shield,n/a--
pUnit:FullCastSpellOnTarget(134,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_450', 1000, 1)
end

function spell1_450(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(20793,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_450', 3000, 1)
end

function spell2_450(pUnit, Event) --@Quick Flame Ward,n/a--
pUnit:FullCastSpellOnTarget(4979,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_450', 11500, 1)
end

function Sorts_450(pUnit, Event)
local choix_sorts_450 = math.random(0, 2)
if choix_sorts_450 == 0 then
pUnit:RegisterEvent('spell0_450', 1, 1)
end
if choix_sorts_450 == 1 then
pUnit:RegisterEvent('spell1_450', 1, 1)
end
if choix_sorts_450 == 2 then
pUnit:RegisterEvent('spell2_450', 1, 1)
end
end

function mob450_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_450', math.random(1500, 3000), 1)
end

function mob450_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob450_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob450_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(450, 1, 'mob450_Action')
RegisterUnitEvent(450, 2, 'mob450_Leave')
RegisterUnitEvent(450, 3, 'mob450_Kill')
RegisterUnitEvent(450, 4, 'mob450_Die')
